﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MuseumOwner.master" AutoEventWireup="true"
    CodeFile="VoucherDetails.aspx.cs" Inherits="VoucherDetails" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <%--<link type="text/css" href="css/jquery-ui-1.7.1.custom.css" rel="stylesheet" />
    <script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="js/jquery-ui-1.7.1.custom.min.js" type="text/javascript"></script>--%>
    <script language="javascript" type="text/javascript">
//        $(function() {
//            $("#txtDate").datepicker();
//        });
   
        function numbersonly(e){
            var unicode=e.charCode? e.charCode : e.keyCode
            if (unicode!=8){ //if the key isn't the backspace key (which we should allow)
            if (unicode != 46 && unicode > 31 && unicode<48||unicode>57) //if not a number
            return false //disable key press
            }
        }
        
        function WatermarkFocus(txtElem, strWatermark) {
            if (txtElem.value == strWatermark) txtElem.value = '';
        }
        function WatermarkBlur(txtElem, strWatermark) {
            if (txtElem.value == '') txtElem.value = strWatermark;
        }
        
        function Validate() {
           if (document.getElementById("<%=ddlGame.ClientID%>").value == "") {
               alert("Please select Game.");
               document.getElementById("<%=ddlGame.ClientID%>").focus();
               return false;
           }
           if (document.getElementById("<%=txtValidFrom.ClientID%>").value == "") {
               alert("Valid From can not be blank.");
               document.getElementById("<%=txtValidFrom.ClientID%>").focus();
               return false;
           }
           if (document.getElementById("<%=txtValidTo.ClientID%>").value == "") {
               alert("Valid To can not be blank.");
               document.getElementById("<%=txtValidTo.ClientID%>").focus();
               return false;
           }

           return true;
       }
    </script>
    <table width="100%" cellspacing="3" cellpadding="3" border="0">
        <tr>
            <td colspan="3">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblGame" Text="Game" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:DropDownList ID="ddlGame" runat="server" Width="200px" DataTextField="GameName"
                    DataValueField="GameID" AutoPostBack="true"
                    onselectedindexchanged="ddlGame_SelectedIndexChanged1">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblValidFrom" Text="Valid From" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtValidFrom" runat="server" CssClass="datePicker" Width="200px"></asp:TextBox>
                &nbsp;<b style="color:red;">*</b>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblValidTo" Text="Valid To" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
            <%--<div>
		        <asp:ScriptManager ID="scriptManager" runat="server" />
		        <liveui:JsManager runat="server" ID="jsManager"/>
		        <liveui:UpdateManager runat="server"/>
		        <liveui:RequestManager runat="server"/>
		        <liveui:StateManager runat="server"/>
		        <liveui:CssManager runat="server"/>
	        </div>--%>
	        <%--<sample:Datepicker runat="server" id="txtValidTo" 
		        onvalueselected="datePicker_ValueSelected"></sample:Datepicker>--%>
                <%--<asp:TextBox ID="txtValidTo" runat="server" CssClass="datePicker" Width="200px"></asp:TextBox>--%>
                <div>
                    <asp:Calendar ID="txtValidTo" runat="server" Visible="False" 
                        OnSelectionChanged="txtValidTo_SelectionChanged"></asp:Calendar>
                        <%--<asp:TextBox ID="txtDate" runat="server"></asp:TextBox>--%>
                </div>
                <asp:TextBox ID="TextBox1" runat="server" Width="170px"></asp:TextBox>
                <asp:ImageButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click" ImageUrl="~/Images/Calendar.jpg"></asp:ImageButton>
                &nbsp;<b style="color:red;">*</b>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblClientName" Text="Client Name" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtClientName" runat="server" MaxLength="50" Width="200px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblFixedPrice" Text="Fixed Price" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtFixedPrice" runat="server" MaxLength="50" Width="200px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblPricePerVoucher" Text="Price Per Voucher" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtPricePerVoucher" runat="server" MaxLength="50" Width="200px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblValidity" Text="Voucher Number" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:Label ID="lblVoucherNumber" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                <asp:Button ID="btnSubmit" Text="Create" runat="server" OnClick="btnCreate_Click" OnClientClick="return Validate();" />&nbsp;&nbsp;
                <asp:Button ID="btnReset" Text="Reset" runat="server" OnClick="btnReset_Click" />
            </td>
        </tr>
        <tr>
            <td colspan="3">
                <asp:Label ID="lblMessage" runat="server" ForeColor="Red" Visible="true"></asp:Label>
            </td>
        </tr>
    </table>
</asp:Content>
